package com.example.practice2023.mapper;

import com.example.practice2023.pojo.Good;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodMapper {
    Good selectById(Integer goodId);

    List<Good> selectByPage(@Param("index") Integer index,
                            @Param("limit") Integer limit,
                            @Param("goodTitle")String goodTitle,
                            @Param("goodCode")String goodCode,
                            @Param("goodType")String goodType,
                            @Param("goodStatus")Integer goodStatus
    );
    int selectAllCount(@Param("goodTitle")String goodTitle,
                       @Param("goodCode")String goodCode,
                       @Param("goodType")String goodType,
                       @Param("goodStatus")Integer goodStatus);


    void insert(Good good);
    void updateById(Good good);
    void deleteById(Integer goodId);
}
